/**
 * a base class for all objects that allows for "abstract" methods that are prefaced
 * with a $, and if they are not implemented in the subclass, throw an exception
 * this is probably good for development, and then perhaps i could
 * build something at some point to stub it out for production (?when building)
 * the implementing class can implement $methodName or just methodName
 * @author maulin
 */

dojo.provide("medryx.AbstractBase");
dojo.require("medryx.exceptions.UnimplementedAbstractMethodException");
dojo.declare("medryx.AbstractBase", null, {
	constructor:function(args) {
		for (var methodName in this) {
            if (methodName.charAt(0) === '$') {
                if (!dojo.isFunction(this[methodName.replace('$', "")])) {
                    var err = new medryx.exceptions.UnimplementedAbstractMethodException(methodName);
					throw err;
                } 
            }
		}
	}
});
